/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package BO;

import java.util.GregorianCalendar;

/**
 *
 * @author olivierm
 */
public class Intervention {
    
    //*******************************************************************
    //Variables
    //*******************************************************************
    
    private GregorianCalendar _creation;
    private GregorianCalendar _intervention;
    private int _numeros;
    private int _priorité;
    private Employe _technicien;
    private InterventionStatus _status;
    private Intervention _parentIntervention;
    private Intervention _enfantIntervention;
    private Adresse _adresseIntervention;

    //*******************************************************************
    //Constructeurs
    //*******************************************************************
    
    public Intervention(GregorianCalendar _creation, GregorianCalendar _intervention, int _priorité, Employe _technicien, InterventionStatus _status, Intervention _parentIntervention, Intervention _enfantIntervention, Adresse _adresseIntervention) {
        this._creation = _creation;
        this._intervention = _intervention;
        this._priorité = _priorité;
        this._status = _status;
        this._parentIntervention = _parentIntervention;
        this._enfantIntervention = _enfantIntervention;
        this._adresseIntervention = _adresseIntervention;
        //faire l'ajout db
        
        //recuperer le num de l'intervention
        
        //ajout dans la liste d'intervention
        if(!ListeIntervention.getInstance().get_listeIntervention().contains(this))
        ListeIntervention.getInstance().ajouterIntervention(this);
        
    }

    //*******************************************************************
    //Getters et Setters
    //*******************************************************************
    
    public Adresse get_adresseIntervention() {
        return _adresseIntervention;
    }

    public void set_adresseIntervention(Adresse _adresseIntervention) {
        this._adresseIntervention = _adresseIntervention;
    }

    public GregorianCalendar get_creation() {
        return _creation;
    }

    public void set_creation(GregorianCalendar _creation) {
        this._creation = _creation;
    }

    public Intervention get_enfantIntervention() {
        return _enfantIntervention;
    }

    public void set_enfantIntervention(Intervention _enfantIntervention) {
        this._enfantIntervention = _enfantIntervention;
    }

    public GregorianCalendar get_intervention() {
        return _intervention;
    }

    public void set_intervention(GregorianCalendar _intervention) {
        this._intervention = _intervention;
    }

    public Intervention get_parentIntervention() {
        return _parentIntervention;
    }

    public void set_parentIntervention(Intervention _parentIntervention) {
        this._parentIntervention = _parentIntervention;
    }

    public int get_priorité() {
        return _priorité;
    }

    public void set_priorité(int _priorité) {
        this._priorité = _priorité;
    }

    public InterventionStatus get_status() {
        return _status;
    }

    public void set_status(InterventionStatus _status) {
        this._status = _status;
    }

    public Employe get_technicien() {
        return _technicien;
    }

    public void set_technicien(Employe _technicien) {
        this._technicien = _technicien;
    }

    public int get_numeros() {
        return _numeros;
    }

    public void set_numeros(int _numeros) {
        this._numeros = _numeros;
    }
    
    
    //*******************************************************************
    //Méthode d'instance
    //*******************************************************************
    
    //*******************************************************************
    //Méthode de classe
    //*******************************************************************    
}
